// API响应类型定义
export interface ApiResponse<T = any> {
  success: boolean
  data?: T
  error?: string
  message?: string
  pagination?: {
    page: number
    pageSize: number
    total: number
    totalPages: number
  }
}

export interface Project {
  id: number
  title: string
  description: string
  content: string
  status: 'published' | 'draft' | 'archived'
  is_featured: boolean
  category: string
  technologies: string[]
  cover_image_id: number
  cover_image_url: string
  view_count: number
  like_count: number
  demo_url?: string
  github_url?: string
  created_at: string
  updated_at: string
}

export interface Category {
  id: number
  name: string
  slug: string
  description?: string
  postCount: number
}

export interface Tag {
  id: number
  name: string
  slug: string
  description?: string
  postCount: number
}

export interface Post {
  id: number
  title: string
  content: string
  excerpt: string
  status: 'published' | 'draft' | 'archived'
  featured_image?: string
  view_count: number
  like_count: number
  comment_count: number
  created_at: string
  updated_at: string
  published_at?: string
  author: {
    id: number
    name: string
    avatar?: string
  }
  categories: Category[]
  tags: Tag[]
}

export interface Stats {
  totalProjects: number
  totalPosts: number
  totalCategories: number
  totalTags: number
  featuredProjects: number
  publishedPosts: number
}